This invention relates to a method and apparatus for generating documents using templates. The invention is particularly although not exclusively concerned with generating text format documents, such as Web pages.
As more and more websites start to contain functionality as well as static information, in some cases fronting major enterprise applications, it is becoming common to generate Web pages independently for each user, dynamically on request. This is necessary so that results of queries or calculations can be inserted into the pages, and so that personalisation can be effected.
Traditionally this meant that building Web pages became a development programming task. “CGI” programs were written to perform application functions and to output HTML (Hypertext Markup Language) responses. But this meant that programmers were also responsible for the look and feel of the site, normally the province of graphic designers. Also the simplest change to site design had to go back to the development programmers who created it.
To help this situation, some form of template-based rendering system is now often used. Here, a graphic designer generates HTML for the look and feel of a site, but leaves “holes” into which dynamic information can be placed. This is known as a template. When required, the template is rendered, by inserting the dynamic information into the holes, to generate pure HTML.
Though almost mandatory for dynamic page generation, template-based rendering can in fact also greatly benefit the production of static pages, especially where many pages are expected to follow the same basic layout. In such cases the templates capture these layouts, and help impose house styles. Furthermore, changes in look and feel need only be applied to the templates, not to all the pages that are rendered by them, and alternative templates can be created for use with different client devices. Some systems also provide mechanisms for generating hyperlinks automatically at the page rendering stage, to ensure their consistency.
The main advantages of template-based rendering are:    (i) it separates programming and graphic design aspects, and hence the skills needed; (ii) it allows standard layouts, navigation, and house-styles to be easily imposed; (iii) it makes changes to look and feel easier, since only the templates need altering; (iv) it allows alternative renderings for different devices, by supplying multiple templates for the same content; and (v) in some cases, it allows automatic construction of hyperlinks.
The object of the present invention is to provide a novel template rendering system and method, which provides even greater flexibility in the production of web pages.